package com.itheima.aop;

import com.itheima.utils.DateUtils;
import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;

public class test02 {

    @Test
    public void testo1(){
        try {
            Date s = DateUtils.parseString2Date("2020-02-25");
            System.out.println();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Test
    public void test02(){
        HashMap<Object, Object> map = new HashMap<>();
        String todayTime = null;
        Date todayDate = null;
        try {
            todayTime = DateUtils.parseDate2String(DateUtils.getToday());
            todayDate = DateUtils.parseString2Date(todayTime);
        } catch (Exception e) {
            e.printStackTrace();
        }


        map.put("date",todayDate);
        System.out.println(map);
    }
}
